package com.s.server;

import java.io.IOException;

import io.grpc.ServerBuilder;

public class RLogServer {

    private static final String TAG = "RLog";
    private static final RLogServer sInstance = new RLogServer();

    public static RLogServer getInstance() {
        return sInstance;
    }

    public void startServer() {
        try {
            ServerBuilder.forPort(12110)
                    .addService(new LogServerImpl())
                    .build()
                    .start();
            LocalLog.d(TAG, "start RLog server success !");
        } catch (IOException e) {
            e.printStackTrace();
            LocalLog.e(TAG, "start RLog server failed : " + e.getMessage());
        }
    }

}
